<!DOCTYPE html>

<html>

<head>



    <meta charset="utf-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">



    <title>乡土味士 - 后台管理中心 - 门店店员列表</title>

    <link rel="shortcut icon" href="favicon.ico"> <link href="__PUBLIC__/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">

    <link href="__PUBLIC__/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">



    <!-- Data Tables -->

    <link href="__PUBLIC__/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">



    <link href="__PUBLIC__/css/animate.min.css" rel="stylesheet">

    <link href="__PUBLIC__/css/style.min862f.css?v=4.1.0" rel="stylesheet">



</head>



<body class="gray-bg">

<div class="wrapper wrapper-content  animated fadeInRight">

    <div class="row">

        <div class="col-sm-12">

            <div class="ibox-title" style="min-height: 65px;margin-bottom: 15px;">

                <h5>

                    <a href="<?=U('StoreSaler/index')?>" title="店员列表">

                        <button type="button" class="btn btn-primary">店员列表</button>

                    </a>

                    <a href="<?=U('StoreSaler/addSaler')?>" title="添加店员">

                        <button type="button" class="btn btn-primary">+添加店员</button>

                    </a>

                    <a href="<?=U('StoreSaler/sendMsg')?>" title="推送消息">

                    <button type="button" class="btn btn-primary">+推送消息</button>

                    </a>
                   
                </h5>
                 <input name="keyword" value="{$keyword}" placeholder="门店名称" class="form-control"  style="width: 66%;display: inline;margin-left: 8px;margin-right: 8px;" /><button type="button" class="btn btn-primary" onClick="sou()">搜索</button>

            </div>

            <div class="ibox-content">

                <table class="table table-striped table-bordered table-hover dataTables-example">

                    <thead>

                        <tr>

                            <th>序号</th>

                            <th>所属门店</th>

                            <th>用户昵称</th>

                            <th>店员姓名</th>

                            <th>店员手机号</th>

                            <th>状态</th>

                            <th>操作</th>

                        </tr>

                    </thead>

                    <tbody>

                        <volist name="list" id="vo">

                        <tr class="gradeX">

                            <td>{$vo.id}</td>

                            <td>{$vo.storename}</td>

                            <td>{$vo.nickname}</td>

                            <td>{$vo.salername}</td>

                            <td>{$vo.mobile}</td>

                            <td>

                                <switch name="vo.status">

                                    <case value="0">禁用</case>

                                    <case value="1">启用</case>

                                </switch>

                            </td>

                            <td>

                                <a href="<?=U('StoreSaler/addSaler',['id'=>$vo['id']])?>" style="padding:0 3px;" title="编辑">

                                    <i class="glyphicon glyphicon-pencil"></i>

                                </a>

                                <a href="javascript:;" style="padding:0 3px;" class="js_del" data-id="{$vo.id}" title="删除">

                                    <i class="glyphicon glyphicon-trash"></i>

                                </a>

                            </td>

                        </tr>

                        </volist>

                    </tbody>

                    <tfoot>

                        <tr>

                            <th>序号</th>

                            <th>所属门店</th>

                            <th>用户昵称</th>

                            <th>店员名称</th>

                            <th>店员手机号</th>

                            <th>状态</th>

                            <th>操作</th>

                        </tr>

                    </tfoot>

                </table>



                <!--分页-->

                <div class="footer">

                    {$page}

                </div>

            </div>

        </div>

        </div>

    </div>

</div>



<script src="__PUBLIC__/js/jquery.min.js?v=2.1.4"></script>

<script src="__PUBLIC__/js/bootstrap.min.js?v=3.3.6"></script>

<script src="__PUBLIC__/js/plugins/jeditable/jquery.jeditable.js"></script>

<script src="__PUBLIC__/js/plugins/dataTables/jquery.dataTables.js"></script>

<script src="__PUBLIC__/js/plugins/dataTables/dataTables.bootstrap.js"></script>

<script src="__PUBLIC__/js/content.min.js?v=1.0.0"></script>

<script src="__PUBLIC__/js/layer/layer.js"></script>



<style type="text/css">

    .footer{

        text-align: center;

    }

    .footer a{

        width: 58px;

        height: 20px;

        display: inline-block;

        border: 1px solid #d2d2d2;

        margin-left: 2px;

    }

    .footer span{

        width: 58px;

        height: 20px;

        display: inline-block;

        margin-left: 2px;

    }

    .footer .current{

        background-color: #f4f4f4;

        border: 1px solid #d2d2d2;

    }

</style>



<script>



    $(document).ready(function(){

        $(".dataTables-example").dataTable();

        var oTable=$("#editable").dataTable();

        oTable.$("td").editable("http:///theme/example_ajax.php",{

            "callback":function(sValue,y){

                var aPos=oTable.fnGetPosition(this);

                oTable.fnUpdate(sValue,aPos[0],aPos[1])},

            "submitdata":function(value,settings){

                return{"row_id":this.parentNode.getAttribute("id"),"column":oTable.fnGetPosition(this)[2]}},"width":"90%","height":"100%"

        })

    });



    //删除

    $(".js_del").click(function () {

        var id = $(this).attr('data-id');

        var status = -1;

        var i = layer.load();

        var this_a = $(this);

        $.post('<?=U("StoreSaler/del_saler")?>',{id:id,status:status},function(e){

            layer.close(i);

            if(e.status==1){

                this_a.parent().parent(".gradeX").remove();

                // window.location.reload();

            }else{

                layer.msg(e.msg,{icon:2});

            }

        });

    })


	function sou(){
		window.location.href="__MODULE__/StoreSaler/index/?keyword="+$("input[name='keyword']").val();
	}//end fun
</script>



</body>





<!-- Mirrored from /theme/hplus/table_jqgrid.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:02 GMT -->

</html>

